package com.mazaiting.mail.api;

import com.mazaiting.common.core.domain.result.Result;
import com.mazaiting.mail.api.fallback.MailSendFeignFallbackClient;
import com.mazaiting.mail.constant.ApiConstant;
import com.mazaiting.mail.dto.MailAlarmDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 用户信息远程调用客户端
 */
@FeignClient(value = ApiConstant.SERVICE_MAIL, path = ApiConstant.PATH_MAIL_SEND,
        contextId = ApiConstant.CONTEXT_ID_USER, fallback = MailSendFeignFallbackClient.class)
public interface IMailSendFeignClient {

    /**
     * 邮件预警传输
     * @param mailAlarmDTO 邮件预警传输对象
     * @return 认证信息
     */
    @PostMapping("alarm")
    Result<Boolean> alarm(@RequestBody MailAlarmDTO mailAlarmDTO);
}